﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;

public class EspecialEffect  {

	public static EspecialEffect _instance;

	public static EspecialEffect GetInstance()
	{
		if(_instance==null)
		{
			_instance=new EspecialEffect();
		}
		return _instance;
	}
		

	/// <summary>
	/// 停滞
	/// </summary>
	public void Stagnation(GameObject target, float speed=0)
	{
		EnemyPlane enemyPlane;
		try
		{
			enemyPlane = target.GetComponent<EnemyPlane> ();
			target.GetComponent<EnemyPlane> ().Speed = speed ;

		}catch(Exception e){
			
		}
	}
	/// <summary>
	/// 吸hp
	/// </summary>
	/// <param name="target">Target.</param>
	/// <param name="recoverHP">Recover H.</param>
	public void Absorption(GameObject target, float recoverHP)
	{
		try{
			target.GetComponent<PlayerController> ().RecoverHp(recoverHP);
		}catch{
		}
	}


}
